program upasCashDrawer00;

uses
  Classes,
  Forms,
  upasCashDrawer00main      in 'upasCashDrawer00main.pas',
  upasserversocashdrawer00  in 'upasserversocashdrawer00.pas',
  upascashdrawerso00        in 'upascashdrawerso00.pas',
  upascashdrawerso          in '..\upascashdrawerso.pas',
  upasserversocashdrawer    in '..\upasserversocashdrawer.pas',
  upascashdrawerco          in '..\..\upascashdrawerco.pas',
  upasservercocashdrawer    in '..\..\upasservercocashdrawer.pas',
  upasCashDrawerGUI         in '..\..\upasCashDrawerGUI.pas' {upasCashDrawerForm},
  upascocashdrawer          in '..\..\..\upascocashdrawer.pas',
  upasserverco              in '..\..\..\upasserverco.pas',
  upasco                    in '..\..\..\upasco.pas',
  upasparam                 in '..\..\..\..\upasparam.pas',
  AuditLog                  in '..\..\..\..\..\common\AuditLog.pas',
  ParamUtil                 in '..\..\..\..\..\common\ParamUtil.pas',
  INI_Database              in '..\..\..\..\..\database\INI_Database.pas',
  idata                     in '..\..\..\..\..\industrial\idata.pas',
  IIOThread                 in '..\..\..\..\..\industrial\IIOThread.pas',
  IPollThread               in '..\..\..\..\..\industrial\IPollThread.pas',
  IOPort                    in '..\..\..\..\..\industrial\IOPort.pas',
  IOPortSocket              in '..\..\..\..\..\industrial\IOPortSocket.pas',
  INamedDevice              in '..\..\..\..\..\industrial\NamedDevice\INamedDevice.pas',
  IIONamedDeviceThread      in '..\..\..\..\..\industrial\NamedDevice\IIONamedDeviceThread.pas',
  INamedDeviceSocketServer  in '..\..\..\..\..\industrial\NamedDevice\INamedDeviceSocketServer.pas',
  INamedDeviceServer        in '..\..\..\..\..\industrial\NamedDevice\INamedDeviceServer.pas',
  INamedDeviceSocketClient  in '..\..\..\..\..\industrial\NamedDevice\INamedDeviceSocketClient.pas',
  INamedDeviceClient        in '..\..\..\..\..\industrial\NamedDevice\INamedDeviceClient.pas',
  INI_XCashDrawer           in '..\..\..\..\..\pos\device\devdrv\CashDrawer\INI_XCashDrawer.pas',
  INI_NamedDevice           in '..\..\..\..\..\posdevice\INI_NamedDevice.pas',
  INI_Property              in '..\..\..\..\..\property\INI_Property.pas',
  INI_Section               in '..\..\..\..\..\property\INI_Section.pas',
  blcksock                  in '..\..\..\..\..\..\3rd\ararat\source\lib\blcksock.pas',
  synafpc                   in '..\..\..\..\..\..\3rd\ararat\source\lib\synafpc.pas',
  synsock                   in '..\..\..\..\..\..\3rd\ararat\source\lib\synsock.pas',
  synautil                  in '..\..\..\..\..\..\3rd\ararat\source\lib\synautil.pas',
  synacode                  in '..\..\..\..\..\..\3rd\ararat\source\lib\synacode.pas',
  synaip                    in '..\..\..\..\..\..\3rd\ararat\source\lib\synaip.pas',
  Opos                      in '..\..\..\..\..\..\OPOS\cco\cco_1_11\Opos.pas',
  OposCash                  in '..\..\..\..\..\..\OPOS\cco\cco_1_11\OposCash.pas';

{$R *.res}

var
  tmpS: TStringList;
  ctr: Integer;

begin
  Application.Initialize;
  Application.CreateForm(TupasCashDrawerForm, upasCashDrawerForm);
  upasCashDrawerForm.Emulator := True;

  tmpS := TStringList.Create;
  try
    for ctr := 1 to ParamCount do
      tmpS.Add(ParamStr(ctr));

    upasCashDrawer00main.initialize(tmpS);

    upasCashDrawer00main.CashDrawer.OnDirectIOEvent := upasCashDrawerForm.doDirectIOEvent;
    upasCashDrawer00main.CashDrawer.OnStatusUpdateEvent := upasCashDrawerForm.doStatusUpdateEvent;
  finally
    tmpS.Free;
  end;

  Application.Run;
  upasCashDrawer00main.finalize;
end.
